﻿{% extends "base.html" %}



{% block css %}
<link rel="stylesheet" href="/static/css/admin.css">
<link rel="stylesheet" href="/static/ztree3/css/bootstrapStyle/bootstrapStyle.css" type="text/css">
{% endblock %}

{% block center %}


<!--头部导航-->
<div class="panel panel-default center-top" style="min-width:1300px;" >
  <div class="panel-body">
    <ol class="breadcrumb" style="margin-bottom: 0px;background-color: #FFFFFF;">
      <li><a href="/" style="color: #377CD8;">首页</a></li>
      <li><a href="#">发布管理</a></li>
      <li class="active">{{ title }}</li>
    </ol>
  </div>
</div>



<!--用户信息-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-heading">
      <div class="row" style="padding-top:5px;padding-left:10px;margin-bottom: -5px;">
          <div class="col-sm-3">

              <a class="btn btn-sm btn-success" data-toggle="modal" data-target="#postModal"> 代码回滚 </a>

          </div>

          <div class="col-sm-4" style="display:inline-block">
              <div class="row">

                  <div class="col-sm-5">
                      <div class="form-group">
                          <select  class="form-control"  placeholder="站点名称" id="site-name">
                              {% for site  in site_list %}
                              <option value="{{ site.site_id }}">{{ site.site_name }}</option>
                              {% endfor %}
                          </select>
                      </div>
                  </div>

                  <div class="col-sm-7">
                      <div style="display: inline-block;">
                          <div class="input-group">
                              <input type="text" class="form-control" placeholder="文件路径:ALL 代表全站" id="file-path">
                              <span class="input-group-btn">
                                <button class="btn btn-success" type="button" id="sub-getlog">查询</button>
                              </span>
                          </div>
                      </div>
                  </div>

              </div>


          </div>

      </div>

  </div>
  <div class="panel-body" id="site-info">

        <div style="margin-bottom: 10px;">

            <div class="col-sm-12">
                <table class="table table-hover table-bordered">
                  <thead>
                    <tr style="background-color: #f5f5f5; text-align:center">

                      <th>站点名称</th>
                      <th>IP地址</th>
                      <th>作者</th>
                      <th>查询内容</th>
                      <th>版本号</th>
                      <th>版本信息</th>

                      <th>提交时间</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody id="log-table">
                    {% for i in logs %}
                    <tr>
                      <td name='site_name'>{{ i.site_name }}</td>
                      <td name='ip'>{{ i.ip }}</td>
                      <td>{{ i.author }}</td>
                      <td name='file_path'>{{ i.file_path }}</td>
                      <td name='version_id'>{{ i.version_id }}</td>
                      <td>
                          <div style="max-width:120px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;">
                              {{ i.version_info }}
                          </div>
                      </td>
                      <td>

                          <div style="max-width:150px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;">
                              {{ i.update_time }}
                          </div>

                      </td>

                      <td style="padding-left:5px;">
                        <a href="#" name="rollback" style="text-decoration:none;" ><span class="fa fa-rotate-left" data-toggle="tooltip" data-placement="right" title="回滚"></span> </a>&nbsp

                      </td>
                    </tr>
                    {% endfor %}

                  </tbody>
                </table>

            </div>
        </div>
  </div>
</div>


{% endblock %}


<!-- Modal -->
{% block modal %}


{% endblock  %}

{% block js %}

<script type="text/javascript" src="/static/js/code.js"></script>

<script type="text/javascript">




</script>
{% endblock %}


